Optimal. Leaf size=196 \[ \frac{a b d \text{PolyLog}\left (2,-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (-2 a c f-2 a d f x+b d) \log \left (\frac{(a-b) e^{-2 (e+f x)}}{a+b}+1\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (c+d x)}{f \left (a^2-b^2\right ) (a+b \tanh (e+f x))}-\frac{(c+d x)^2}{2 d \left (a^2-b^2\right )}+\frac{(-2 a c f-2 a d f x+b d)^2}{4 a d f^2 (a-b) (a+b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.286424, antiderivative size = 196, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.278, Rules used = {3733, 3732, 2190, 2279, 2391} \[ \frac{a b d \text{PolyLog}\left (2,-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (-2 a c f-2 a d f x+b d) \log \left (\frac{(a-b) e^{-2 (e+f x)}}{a+b}+1\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (c+d x)}{f \left (a^2-b^2\right ) (a+b \tanh (e+f x))}-\frac{(c+d x)^2}{2 d \left (a^2-b^2\right )}+\frac{(-2 a c f-2 a d f x+b d)^2}{4 a d f^2 (a-b) (a+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3733
Rule 3732
Rule 2190
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \frac{c+d x}{(a+b \tanh (e+f x))^2} \, dx &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \tanh (e+f x))}-\frac{i \int \frac{-i b d+2 i a c f+2 i a d f x}{a+b \tanh (e+f x)} \, dx}{\left (a^2-b^2\right ) f}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \tanh (e+f x))}-\frac{(2 i b) \int \frac{e^{-2 (e+f x)} (-i b d+2 i a c f+2 i a d f x)}{(a+b)^2+\left (a^2-b^2\right ) e^{-2 (e+f x)}} \, dx}{\left (a^2-b^2\right ) f}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (b d-2 a c f-2 a d f x) \log \left (1+\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \tanh (e+f x))}+\frac{(2 a b d) \int \log \left (1+\frac{\left (a^2-b^2\right ) e^{-2 (e+f x)}}{(a+b)^2}\right ) \, dx}{\left (a^2-b^2\right )^2 f}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (b d-2 a c f-2 a d f x) \log \left (1+\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \tanh (e+f x))}-\frac{(a b d) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{\left (a^2-b^2\right ) x}{(a+b)^2}\right )}{x} \, dx,x,e^{-2 (e+f x)}\right )}{\left (a^2-b^2\right )^2 f^2}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (b d-2 a c f-2 a d f x) \log \left (1+\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}+\frac{a b d \text{Li}_2\left (-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \tanh (e+f x))}\\ \end{align*}
Mathematica [C] time = 6.65538, size = 476, normalized size = 2.43 \[ \frac{\text{sech}^2(e+f x) (a \cosh (e+f x)+b \sinh (e+f x)) \left (2 a b d (a \cosh (e+f x)+b \sinh (e+f x)) \left (a \text{PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac{a}{b}\right )+e+f x\right )}\right )+b \sqrt{1-\frac{a^2}{b^2}} e^{-\tanh ^{-1}\left (\frac{a}{b}\right )} (e+f x)^2-i a \left (\pi -2 i \tanh ^{-1}\left (\frac{a}{b}\right )\right ) (e+f x)-2 a \left (\tanh ^{-1}\left (\frac{a}{b}\right )+e+f x\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac{a}{b}\right )+e+f x\right )}\right )+2 a \tanh ^{-1}\left (\frac{a}{b}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac{a}{b}\right )+e+f x\right )\right )+i \pi a \log \left (e^{2 (e+f x)}+1\right )-i \pi a \log (\cosh (e+f x))\right )+2 b^2 f \left (b^2-a^2\right ) (c+d x) \sinh (e+f x)-a \left (a^2-b^2\right ) (e+f x) (d (e-f x)-2 c f) (a \cosh (e+f x)+b \sinh (e+f x))-2 b^2 d (a \cosh (e+f x)+b \sinh (e+f x)) (b (e+f x)-a \log (a \cosh (e+f x)+b \sinh (e+f x)))+4 a b c f (a \cosh (e+f x)+b \sinh (e+f x)) (b (e+f x)-a \log (a \cosh (e+f x)+b \sinh (e+f x)))-4 a b d e (a \cosh (e+f x)+b \sinh (e+f x)) (b (e+f x)-a \log (a \cosh (e+f x)+b \sinh (e+f x)))\right )}{2 a f^2 \left (a^2-b^2\right )^2 (a+b \tanh (e+f x))^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.224, size = 661, normalized size = 3.4 \begin{align*}{\frac{d{x}^{2}}{2\,{a}^{2}+4\,ab+2\,{b}^{2}}}+{\frac{cx}{{a}^{2}+2\,ab+{b}^{2}}}+2\,{\frac{{b}^{2} \left ( dx+c \right ) }{ \left ( a-b \right ) f \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}+a-b \right ) }}-2\,{\frac{{b}^{2}d\ln \left ({{\rm e}^{fx+e}} \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+{\frac{{b}^{2}d\ln \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}+a-b \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+4\,{\frac{abc\ln \left ({{\rm e}^{fx+e}} \right ) }{ \left ( a-b \right ) ^{2}f \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-2\,{\frac{abc\ln \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}+a-b \right ) }{ \left ( a-b \right ) ^{2}f \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-4\,{\frac{abde\ln \left ({{\rm e}^{fx+e}} \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+2\,{\frac{abde\ln \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}+a-b \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+2\,{\frac{abdx}{ \left ( a-b \right ) f \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( -a+b \right ) }\ln \left ( 1-{\frac{ \left ( a+b \right ){{\rm e}^{2\,fx+2\,e}}}{-a+b}} \right ) }+2\,{\frac{abde}{ \left ( a-b \right ){f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( -a+b \right ) }\ln \left ( 1-{\frac{ \left ( a+b \right ){{\rm e}^{2\,fx+2\,e}}}{-a+b}} \right ) }-2\,{\frac{abd{x}^{2}}{ \left ( a-b \right ) \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( -a+b \right ) }}-4\,{\frac{abdex}{ \left ( a-b \right ) f \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( -a+b \right ) }}-2\,{\frac{abd{e}^{2}}{ \left ( a-b \right ){f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( -a+b \right ) }}+{\frac{bda}{ \left ( a-b \right ){f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( -a+b \right ) }{\it polylog} \left ( 2,{\frac{ \left ( a+b \right ){{\rm e}^{2\,fx+2\,e}}}{-a+b}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{2} \,{\left (8 \, a b f \int \frac{x}{a^{4} f e^{\left (2 \, f x + 2 \, e\right )} + 2 \, a^{3} b f e^{\left (2 \, f x + 2 \, e\right )} - 2 \, a b^{3} f e^{\left (2 \, f x + 2 \, e\right )} - b^{4} f e^{\left (2 \, f x + 2 \, e\right )} + a^{4} f - 2 \, a^{2} b^{2} f + b^{4} f}\,{d x} - 2 \, b^{2}{\left (\frac{2 \,{\left (f x + e\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} f^{2}} - \frac{\log \left ({\left (a + b\right )} e^{\left (2 \, f x + 2 \, e\right )} + a - b\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} f^{2}}\right )} + \frac{{\left (a^{2} f e^{\left (2 \, e\right )} - b^{2} f e^{\left (2 \, e\right )}\right )} x^{2} e^{\left (2 \, f x\right )} + 4 \, b^{2} x +{\left (a^{2} f - 2 \, a b f + b^{2} f\right )} x^{2}}{a^{4} f - 2 \, a^{2} b^{2} f + b^{4} f +{\left (a^{4} f e^{\left (2 \, e\right )} + 2 \, a^{3} b f e^{\left (2 \, e\right )} - 2 \, a b^{3} f e^{\left (2 \, e\right )} - b^{4} f e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}\right )} d - c{\left (\frac{2 \, a b \log \left (-{\left (a - b\right )} e^{\left (-2 \, f x - 2 \, e\right )} - a - b\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} f} + \frac{2 \, b^{2}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} +{\left (a^{4} - 2 \, a^{3} b + 2 \, a b^{3} - b^{4}\right )} e^{\left (-2 \, f x - 2 \, e\right )}\right )} f} - \frac{f x + e}{{\left (a^{2} + 2 \, a b + b^{2}\right )} f}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.84712, size = 4065, normalized size = 20.74 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{c + d x}{\left (a + b \tanh{\left (e + f x \right )}\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d x + c}{{\left (b \tanh \left (f x + e\right ) + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]